<%--
  Created by IntelliJ IDEA.
  User: 27433
  Date: 2023/11/15
  Time: 15:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.time.LocalDateTime" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Show Time</title>
</head>
<body>
<% LocalDateTime now = LocalDateTime.now(); %>
<div align="center" style="color:lightpink">访问改页面的时间是:
    <%= now.getYear()+"年 "+now.getMonthValue()+"月 "+now.getDayOfMonth()+"日 "
        +now.getHour()+"时 "+now.getMinute()+"分 "+now.getSecond()+"秒" %></div>
<%--注释: 每秒钟刷新一次页面--%>
<script>
    setInterval(() => {
        location.reload();
    },1000)
</script>
</body>
</html>